import request from '@/common/request.js'

const api = {}
//登录
api.login = params => request.globalRequest(`/api/v1/user/login`, 'POST', params, 1,'登录中')

api.getShareInfo = params => request.globalRequest(`/api/v1/user/getShareInfo`, 'POST', params, 1,'')


api.info = params => request.globalRequest(`/api/v1/user/info`, 'POST', params, 1,'')
api.myRecommend = params => request.globalRequest(`/api/v1/user/myRecommend`, 'POST', params, 1,'')
api.verifyInfo = params => request.globalRequest(`/api/v1/user/verifyInfo`, 'POST', params, 1,'')
api.uploadFile = params => request.globalRequest(`/api/common/upload`, 'POST', params, 1,'')
api.updateprofile = params => request.globalRequest(`/api/v1/user/updateprofile`, 'POST', params, 1,'')

api.doVerify = params => request.globalRequest(`/api/v1/userverify/verify`, 'POST', params, 1,'实名中')
api.worktype = params => request.globalRequest(`/api/v1/work/worktype`, 'POST', params, 1,'')
api.addWorkAddress = params => request.globalRequest(`/api/v1/work/addWorkAddress`, 'POST', params, 1,'添加中')

api.myProfile = params => request.globalRequest(`/api/v1/user/profile`, 'POST', params, 1,'')
api.workAddressList = params => request.globalRequest(`/api/v1/user/workAddressList`, 'POST', params, 1,'')

api.publishWork = params => request.globalRequest(`/api/v1/work/publishWork`, 'POST', params, 1,'')
api.teamList = params => request.globalRequest(`/api/v1/user/teamList`, 'POST', params, 1,'')
api.recordWork = params => request.globalRequest(`/api/v1/work/recordWork`, 'POST', params, 1,'记录中')
api.myworkList = params => request.globalRequest(`/api/v1/work/myworkList`, 'POST', params, 1,'')
api.shopIndex = params => request.globalRequest(`/api/v1/index/index`, 'POST', params, 1,'')
api.skuDetail = params => request.globalRequest(`/api/v1/goods/detail`, 'POST', params, 1,'获取数据中')

api.getDefault = params => request.globalRequest(`/api/v1/useraddress/getDefault`, 'POST', params, 1,'获取中')
api.addAdress = params => request.globalRequest(`/api/v1/useraddress/add`, 'POST', params, 1,'添加中')
api.addOrder = params => request.globalRequest(`/api/v2/order/buyPay`, 'POST', params, 1,'下单中')
api.getOrderList = params => request.globalRequest(`/api/v1/order/getList`, 'POST', params, 1,'获取中')

api.amount = params => request.globalRequest(`/api/v1/user/amount`, 'POST', params, 1,'获取中')
//用户银行卡信息
api.bankInfo = params => request.globalRequest(`/api/v1/userbank/info`, 'POST', params, 1,'获取中')
api.verifyDetail = params => request.globalRequest(`/api/v1/userverify/verifyDetail`, 'POST', params, 1,'获取中')
api.bankAnd = params => request.globalRequest(`/api/v1/userbank/add`, 'POST', params, 1,'处理中')
api.doWithDraw  = params => request.globalRequest(`/api/v1/user/doWithDraw`, 'POST', params, 1,'处理中')

api.amountList  = params => request.globalRequest(`/api/v1/user/amountList`, 'POST', params, 1,'')
api.firstIndex  = params => request.globalRequest(`/api/v1/index/firstIndex`, 'POST', params, 1,'')
api.sendMessage  = params => request.globalRequest(`/api/sms/sendMessage`, 'POST', params, 1,'')
api.register  = params => request.globalRequest(`/api/v1/user/register`, 'POST', params, 1,'')
api.charge  = params => request.globalRequest(`/api/v1/charge/addOrder`, 'POST', params, 1,'充值中')


api.job  = params => request.globalRequest(`/api/v1/shop/job`, 'POST', params, 1,'')
api.join  = params => request.globalRequest(`/api/v1/shop/join`, 'POST', params, 1,'投递中')
api.searchShop  = params => request.globalRequest(`/api/v1/shop/search`, 'POST', params, 1,'搜索中')
api.choose  = params => request.globalRequest(`/api/v1/shop/selectShop`, 'POST', params, 1,'')


api.choose  = params => request.globalRequest(`/api/v1/shop/selectShop`, 'POST', params, 1,'处理中')

api.userscore  = params => request.globalRequest(`/api/v1/userscore/index`, 'POST', params, 1,'')

api.teamWorkHistory  = params => request.globalRequest(`/api/v1/work/teamWorkHistory`, 'POST', params, 1,'')
api.updateUserInfo  = params => request.globalRequest(`/api/v1/user/updateUserInfo`, 'POST', params, 1,'修改中')


api.getWorkType = params => request.globalRequest(`/api/v1/work/getWorkType`, 'POST', params, 1,'')
api.deleteWorkHistory = params => request.globalRequest(`/api/v1/work/deleteWorkHistory`, 'POST', params, 1,'处理中')

export default api